Integrand size = 21, antiderivative size = 115 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {a^2 \log (\cos (c+d x))}{d}+\frac {2 a b \sec (c+d x)}{d}-\frac {a^2 \sec ^2(c+d x)}{d}-\frac {4 a b \sec ^3(c+d x)}{3 d}+\frac {a^2 \sec ^4(c+d x)}{4 d}+\frac {2 a b \sec ^5(c+d x)}{5 d}+\frac {b^2 \tan ^6(c+d x)}{6 d} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.14, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3970, 962} \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {\left (a^2-2 b^2\right ) \sec ^4(c+d x)}{4 d}-\frac {\left (2 a^2-b^2\right ) \sec ^2(c+d x)}{2 d}-\frac {a^2 \log (\cos (c+d x))}{d}+\frac {2 a b \sec ^5(c+d x)}{5 d}-\frac {4 a b \sec ^3(c+d x)}{3 d}+\frac {2 a b \sec (c+d x)}{d}+\frac {b^2 \sec ^6(c+d x)}{6 d} \]
[In]
[Out]
Rule 962
Rule 3970
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {(a+x)^2 \left (b^2-x^2\right )^2}{x} \, dx,x,b \sec (c+d x)\right )}{b^4 d} \\ & = \frac {\text {Subst}\left (\int \left (2 a b^4+\frac {a^2 b^4}{x}-b^2 \left (2 a^2-b^2\right ) x-4 a b^2 x^2+\left (a^2-2 b^2\right ) x^3+2 a x^4+x^5\right ) \, dx,x,b \sec (c+d x)\right )}{b^4 d} \\ & = -\frac {a^2 \log (\cos (c+d x))}{d}+\frac {2 a b \sec (c+d x)}{d}-\frac {\left (2 a^2-b^2\right ) \sec ^2(c+d x)}{2 d}-\frac {4 a b \sec ^3(c+d x)}{3 d}+\frac {\left (a^2-2 b^2\right ) \sec ^4(c+d x)}{4 d}+\frac {2 a b \sec ^5(c+d x)}{5 d}+\frac {b^2 \sec ^6(c+d x)}{6 d} \\ \end{align*}
Time = 0.33 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.91 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {-60 a^2 \log (\cos (c+d x))+120 a b \sec (c+d x)+30 \left (-2 a^2+b^2\right ) \sec ^2(c+d x)-80 a b \sec ^3(c+d x)+15 \left (a^2-2 b^2\right ) \sec ^4(c+d x)+24 a b \sec ^5(c+d x)+10 b^2 \sec ^6(c+d x)}{60 d} \]
[In]
[Out]
Time = 2.28 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.81
method | result | size |
parts | \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {b^{2} \tan \left (d x +c \right )^{6}}{6 d}+\frac {2 a b \left (\frac {\sec \left (d x +c \right )^{5}}{5}-\frac {2 \sec \left (d x +c \right )^{3}}{3}+\sec \left (d x +c \right )\right )}{d}\) | \(93\) |
derivativedivides | \(\frac {\frac {b^{2} \sec \left (d x +c \right )^{6}}{6}+\frac {2 a b \sec \left (d x +c \right )^{5}}{5}+\frac {a^{2} \sec \left (d x +c \right )^{4}}{4}-\frac {b^{2} \sec \left (d x +c \right )^{4}}{2}-\frac {4 a b \sec \left (d x +c \right )^{3}}{3}-a^{2} \sec \left (d x +c \right )^{2}+\frac {\sec \left (d x +c \right )^{2} b^{2}}{2}+2 a b \sec \left (d x +c \right )+a^{2} \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(116\) |
default | \(\frac {\frac {b^{2} \sec \left (d x +c \right )^{6}}{6}+\frac {2 a b \sec \left (d x +c \right )^{5}}{5}+\frac {a^{2} \sec \left (d x +c \right )^{4}}{4}-\frac {b^{2} \sec \left (d x +c \right )^{4}}{2}-\frac {4 a b \sec \left (d x +c \right )^{3}}{3}-a^{2} \sec \left (d x +c \right )^{2}+\frac {\sec \left (d x +c \right )^{2} b^{2}}{2}+2 a b \sec \left (d x +c \right )+a^{2} \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(116\) |
risch | \(i a^{2} x +\frac {2 i a^{2} c}{d}+\frac {4 a b \,{\mathrm e}^{11 i \left (d x +c \right )}-4 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+\frac {28 a b \,{\mathrm e}^{9 i \left (d x +c \right )}}{3}-12 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+\frac {104 a b \,{\mathrm e}^{7 i \left (d x +c \right )}}{5}-16 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+\frac {20 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+\frac {104 a b \,{\mathrm e}^{5 i \left (d x +c \right )}}{5}-12 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+\frac {28 a b \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}-4 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+4 a b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}-\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(248\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {60 \, a^{2} \cos \left (d x + c\right )^{6} \log \left (-\cos \left (d x + c\right )\right ) - 120 \, a b \cos \left (d x + c\right )^{5} + 80 \, a b \cos \left (d x + c\right )^{3} + 30 \, {\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} - 24 \, a b \cos \left (d x + c\right ) - 15 \, {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 10 \, b^{2}}{60 \, d \cos \left (d x + c\right )^{6}} \]
[In]
[Out]
Time = 0.98 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.64 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=\begin {cases} \frac {a^{2} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a^{2} \tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {a^{2} \tan ^{2}{\left (c + d x \right )}}{2 d} + \frac {2 a b \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{5 d} - \frac {8 a b \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{15 d} + \frac {16 a b \sec {\left (c + d x \right )}}{15 d} + \frac {b^{2} \tan ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{6 d} - \frac {b^{2} \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{6 d} + \frac {b^{2} \sec ^{2}{\left (c + d x \right )}}{6 d} & \text {for}\: d \neq 0 \\x \left (a + b \sec {\left (c \right )}\right )^{2} \tan ^{5}{\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.94 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {60 \, a^{2} \log \left (\cos \left (d x + c\right )\right ) - \frac {120 \, a b \cos \left (d x + c\right )^{5} - 80 \, a b \cos \left (d x + c\right )^{3} - 30 \, {\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 24 \, a b \cos \left (d x + c\right ) + 15 \, {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 10 \, b^{2}}{\cos \left (d x + c\right )^{6}}}{60 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (107) = 214\).
Time = 1.69 (sec) , antiderivative size = 341, normalized size of antiderivative = 2.97 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {60 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - 60 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {147 \, a^{2} + 128 \, a b + \frac {1002 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {768 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {2925 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {1920 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {4140 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {1280 \, a b {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {640 \, b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {2925 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {1002 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {147 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}}{{\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{6}}}{60 \, d} \]
[In]
[Out]
Time = 17.83 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.87 \[ \int (a+b \sec (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {2\,a^2\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}+\frac {\frac {32\,a\,b}{15}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (12\,a^2+32\,b\,a\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2+\frac {64\,b\,a}{5}\right )+12\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (20\,a^2+\frac {64\,a\,b}{3}-\frac {32\,b^2}{3}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
[In]
[Out]